<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" 
      xmlns:h="http://java.sun.com/jsf/html" 
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:ice="http://www.icesoft.com/icefaces/component"
      xmlns:f="http://java.sun.com/jsf/core">

    <h:body>
        <ui:composition template="WEB-INF/travelTemplate.xhtml">
            <ui:param name="title" value="MAJC Travelagency - checkout" />
            <ui:define name="content">
                <div id="container">
                    
                    <ice:form >
                    <ice:outputLabel value="Flight info:" />
                    <ice:panelGrid columns="2" >
                        <ice:outputText value="From:" />
                        <ice:outputText value="#{orderBackingBean.bookedFlight.fromAirport}" />
                        <ice:outputText value="To:" />
                        <ice:outputText value="#{orderBackingBean.bookedFlight.toAirport}" />
                        <ice:outputText value="Departure time:" />
                        <ice:outputText value="#{orderBackingBean.bookedFlight.depTime}" />
                        <ice:outputText value="Arrival time:" />
                        <ice:outputText value="#{orderBackingBean.bookedFlight.arrTime}" />
                        <ice:outputText value="Price:" />
                        <ice:outputText value="#{orderBackingBean.bookedFlight.price} USD"/>
                    </ice:panelGrid>
                    <br />
                    <ice:outputLabel value="Hotel info:" rendered="#{orderBackingBean.hotelBooked}" />
                    <ice:panelGrid columns="2" >
                        <ice:outputText value="Hotel name:" />
                        <ice:outputText value="#{orderBackingBean.bookedHotel.name}" />
                        <ice:outputText value="City:" />
                        <ice:outputText value="#{orderBackingBean.bookedHotel.closestCity}" />
                        <ice:outputText value="Description:" />
                        <ice:outputText value="#{orderBackingBean.bookedHotel.description}" />
                        <ice:outputText value="Roomtype:" />
                        <ice:outputText value="#{hotelBackingBean.roomtype}" />
                        <ice:outputText value="Price:" />
                        <ice:outputText value="#{orderUtilityBean.calculateTotalHotelPrice}" />
                    </ice:panelGrid>
                    <br/>
                    <ice:panelGrid columns="2" >
                        <ice:outputLabel value="Total price:" />
                        <ice:outputLabel value="#{orderUtilityBean.calculateTotalPrice}" />
                    </ice:panelGrid>
                    <br />
                    <ice:outputLabel value="Personal details:" />
                    <ice:panelGrid columns="2" >
                        <ice:outputText value="Name:" />
                        <ice:inputText value="#{customerBackingBean.name}" />
                        <ice:outputText value="Address:" />
                        <ice:inputText value="#{customerBackingBean.address}" />
                        <ice:outputText value="E-mail:" />
                        <ice:inputText value="#{customerBackingBean.email}" />
                    </ice:panelGrid>
                    <br/>
                    <ice:outputLabel value="Payment:" />
                    <ice:commandButton value="Confirm booking" action="#{orderControllerBean.doConfirmBooking}" >
                        
                    </ice:commandButton>
                    </ice:form>
                    
                </div>
            </ui:define>
        </ui:composition>
    </h:body>

</html>

